Our application runs on both Mac and Windows, and both platforms use the same movie file, which is flattened and Cinepak-compressed. The movie is quite long, and we play short segments of it.
We are very concerned because our QuickTime performance dramatically degraded when we switched to QuickTime 2.0 for Windows. The Mac version seems OK.
The following is our calling sequence to QuickTime:
Select portion of movie to play...
MCDoAction (movieControl, mcActionSetPlaySelection, (LPVOID)TRUE); // Set the part of the movie we want to play MCDoAction (movieControl, mcActionSetSelectionBegin, & (movieInfo.begin)); MCDoAction (movieControl, mcActionSetSelectionDuration, &length); // Go to the beginning of the movie portion MCDoAction (movieControl, mcActionGoToTime, &(movieInfo.begin));
Activate...
SetMovieActive (theMovie, TRUE);
Play...
PrerollMovie (theMovie, 0, GetMoviePreferredRate(theMovie)); // Tell the controller to play the video MCDoAction (movieControl, mcActionPlay, (LPVOID)MAKELFIXED(1,0)); // Deactivate the movie controller so mouse clicks don't stop the movie. // We can do this safely as the movie has started playing MCActivate (movieControl, hCanvasWnd, FALSE);
This bug was not apparent before because QTW 1.x did the proper prerolling for
you. QTW 2.0.x no longer prerolls automatically, so developers must assume the
responsibility for doing it properly.